﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdCmEntityColor : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdCmEntityColor(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdCmEntityColor obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdCmEntityColor()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdCmEntityColor(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdCmEntityColor() : this(GlobalsPINVOKE.new_OdCmEntityColor__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmEntityColor(OdCmEntityColor color) : this(GlobalsPINVOKE.new_OdCmEntityColor__SWIG_1(OdCmEntityColor.getCPtr(color)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmEntityColor(OdCmEntityColor.ColorMethod colorMethod) : this(GlobalsPINVOKE.new_OdCmEntityColor__SWIG_2((int)colorMethod), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmEntityColor(byte red, byte green, byte blue) : this(GlobalsPINVOKE.new_OdCmEntityColor__SWIG_3(red, green, blue), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmEntityColor Assign(OdCmEntityColor color)
		{
			OdCmEntityColor result = new OdCmEntityColor(GlobalsPINVOKE.OdCmEntityColor_Assign(this.swigCPtr, OdCmEntityColor.getCPtr(color)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsEqual(OdCmEntityColor color)
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_IsEqual(this.swigCPtr, OdCmEntityColor.getCPtr(color));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsNotEqual(OdCmEntityColor color)
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_IsNotEqual(this.swigCPtr, OdCmEntityColor.getCPtr(color));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setColorMethod(OdCmEntityColor.ColorMethod colorMethod)
		{
			GlobalsPINVOKE.OdCmEntityColor_setColorMethod__SWIG_0(this.swigCPtr, (int)colorMethod);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmEntityColor.ColorMethod colorMethod()
		{
			OdCmEntityColor.ColorMethod result = (OdCmEntityColor.ColorMethod)GlobalsPINVOKE.OdCmEntityColor_colorMethod__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setColor(uint color)
		{
			GlobalsPINVOKE.OdCmEntityColor_setColor__SWIG_0(this.swigCPtr, color);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public uint color()
		{
			uint result = GlobalsPINVOKE.OdCmEntityColor_color(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setColorIndex(short colorIndex)
		{
			GlobalsPINVOKE.OdCmEntityColor_setColorIndex__SWIG_0(this.swigCPtr, colorIndex);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public short colorIndex()
		{
			short result = GlobalsPINVOKE.OdCmEntityColor_colorIndex__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setRGB(byte red, byte green, byte blue)
		{
			GlobalsPINVOKE.OdCmEntityColor_setRGB__SWIG_0(this.swigCPtr, red, green, blue);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setRed(byte red)
		{
			GlobalsPINVOKE.OdCmEntityColor_setRed__SWIG_0(this.swigCPtr, red);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setGreen(byte green)
		{
			GlobalsPINVOKE.OdCmEntityColor_setGreen__SWIG_0(this.swigCPtr, green);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setBlue(byte blue)
		{
			GlobalsPINVOKE.OdCmEntityColor_setBlue__SWIG_0(this.swigCPtr, blue);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public byte red()
		{
			byte result = GlobalsPINVOKE.OdCmEntityColor_red__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public byte green()
		{
			byte result = GlobalsPINVOKE.OdCmEntityColor_green__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public byte blue()
		{
			byte result = GlobalsPINVOKE.OdCmEntityColor_blue__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isByColor()
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isByColor__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isByLayer()
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isByLayer__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isByBlock()
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isByBlock__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isByACI()
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isByACI__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isForeground()
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isForeground__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isByDgnIndex()
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isByDgnIndex__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isNone()
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isNone__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTrueColor()
		{
			GlobalsPINVOKE.OdCmEntityColor_setTrueColor__SWIG_0(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public static void setColorMethod(ref uint pRGBM, OdCmEntityColor.ColorMethod colorMethod)
		{
			GlobalsPINVOKE.OdCmEntityColor_setColorMethod__SWIG_1(ref pRGBM, (int)colorMethod);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public static OdCmEntityColor.ColorMethod colorMethod(uint pRGBM)
		{
			OdCmEntityColor.ColorMethod result = (OdCmEntityColor.ColorMethod)GlobalsPINVOKE.OdCmEntityColor_colorMethod__SWIG_1(pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static void setColor(ref uint pRGBM, uint color)
		{
			GlobalsPINVOKE.OdCmEntityColor_setColor__SWIG_1(ref pRGBM, color);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public static void setColorIndex(ref uint pRGBM, short colorIndex)
		{
			GlobalsPINVOKE.OdCmEntityColor_setColorIndex__SWIG_1(ref pRGBM, colorIndex);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public static short colorIndex(uint pRGBM)
		{
			short result = GlobalsPINVOKE.OdCmEntityColor_colorIndex__SWIG_1(pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static void setRGB(ref uint pRGBM, byte red, byte green, byte blue)
		{
			GlobalsPINVOKE.OdCmEntityColor_setRGB__SWIG_1(ref pRGBM, red, green, blue);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public static void setRed(ref uint pRGBM, byte red)
		{
			GlobalsPINVOKE.OdCmEntityColor_setRed__SWIG_1(ref pRGBM, red);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public static void setGreen(ref uint pRGBM, byte green)
		{
			GlobalsPINVOKE.OdCmEntityColor_setGreen__SWIG_1(ref pRGBM, green);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public static void setBlue(ref uint pRGBM, byte blue)
		{
			GlobalsPINVOKE.OdCmEntityColor_setBlue__SWIG_1(ref pRGBM, blue);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public static byte red(uint pRGBM)
		{
			byte result = GlobalsPINVOKE.OdCmEntityColor_red__SWIG_1(pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static byte green(uint pRGBM)
		{
			byte result = GlobalsPINVOKE.OdCmEntityColor_green__SWIG_1(pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static byte blue(uint pRGBM)
		{
			byte result = GlobalsPINVOKE.OdCmEntityColor_blue__SWIG_1(pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static bool isByColor(uint pRGBM)
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isByColor__SWIG_1(pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static bool isByLayer(uint pRGBM)
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isByLayer__SWIG_1(pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static bool isByBlock(uint pRGBM)
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isByBlock__SWIG_1(pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static bool isByACI(uint pRGBM)
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isByACI__SWIG_1(pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static bool isForeground(uint pRGBM)
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isForeground__SWIG_1(pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static bool isByDgnIndex(uint pRGBM)
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isByDgnIndex__SWIG_1(pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static bool isNone(uint pRGBM)
		{
			bool result = GlobalsPINVOKE.OdCmEntityColor_isNone__SWIG_1(pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static void setTrueColor(ref uint pRGBM)
		{
			GlobalsPINVOKE.OdCmEntityColor_setTrueColor__SWIG_1(ref pRGBM);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public static uint lookUpRGB(byte colorIndex)
		{
			uint result = GlobalsPINVOKE.OdCmEntityColor_lookUpRGB(colorIndex);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static byte lookUpACI(byte red, byte green, byte blue)
		{
			byte result = GlobalsPINVOKE.OdCmEntityColor_lookUpACI(red, green, blue);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;

		public enum Color
		{
			kRed,
			kGreen,
			kBlue
		}

		public enum ColorMethod
		{
			kByLayer = 192,
			kByBlock,
			kByColor,
			kByACI,
			kByPen,
			kForeground,
			kByDgnIndex = 199,
			kNone
		}

		public enum ACIcolorMethod
		{
			kACIbyBlock,
			kACIforeground = 7,
			kACIbyLayer = 256,
			kACIclear = 0,
			kACIRed,
			kACIYellow,
			kACIGreen,
			kACICyan,
			kACIBlue,
			kACIMagenta,
			kACIWhite,
			kACIstandard = 7,
			kACImaximum = 255,
			kACInone = 257,
			kACIminimum = -255
		}
	}
}
